package com.sharewithus.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.sharewithus.dao.IRelationShipDBDAO;

public class RelationShipDBDAOImpl extends SqlMapClientDaoSupport implements
		IRelationShipDBDAO {

	public void addRelationShip(String uid, String follower) throws Exception {
		Map<String, String> map = new HashMap<String, String>();
		map.put("userId", uid);
		map.put("fansId", follower);
		
		this.getSqlMapClientTemplate().insert("addUserRs", map);
	}

	public void removeRelationShip(String uid, String follower)
			throws Exception {
		Map<String, String> map = new HashMap<String, String>();
		map.put("userId", uid);
		map.put("fansId", follower);
		
		this.getSqlMapClientTemplate().delete("cancelUserRs", map);
	}

}

